﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>网站后台内容管理系统登录</title>
<meta name="viewport" content="width=device-width">
<link href="public/css/base.css" rel="stylesheet" type="text/css">
<link href="public/css/login.css" rel="stylesheet" type="text/css">
<script src="../../js/jquery-3.3.1.min.js" type="text/javascript" charset="UTF-8" ></script>
</head>
<body>

<div class="login">
<form action="" method="post" id="form">
	<div class="logo"></div>
    <div class="login_form">
    	<div class="user">
        	<input class="text_value" value="" name="username" type="text" id="username">
            <input class="text_value" value="" name="password" type="password" id="password">
        </div>
        <a class="button" id="login_btn">登录</a>
    </div>
    
    <div id="tip"></div>
    <div class="foot">
        Copyright © 2011-2015  All Rights Reserved. More Templates <a href="http://www.cssmoban.com/" target="_blank" title="小龙神佑">小龙神佑</a> - Collect from <a href="http://www.xlosy.com/" title="小龙神佑" target="_blank">小龙神佑</a>
    </div>
    </form>
</div>
<script>
    $(function () {
        /**登录*/
        $("#login_btn").click(function () {
            $.ajax({
                url:"{:url('index/Commonverification/login')}",
                type:"POST",
                dataType:"json",
                data:$("#login_form").serialize(),
                success:function (data) {
                    if(data.code=="1"){
                        location.reload();
                    }else{
                        alert("用户名或密码错误！");
                    }
                }
            });
        });
    })
</script>
</body>
</html>
